package com.feisuanyz.lyweb01.pojo.dto;

import lombok.Data;
import lombok.AllArgsConstructor;
import jakarta.validation.constraints.NotNull;
import lombok.NoArgsConstructor;
import java.net.URL;
import jakarta.validation.constraints.NotBlank;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 新闻数据传输对象
 *
 * @author deng
 * @date 2025-02-26 11:57:37
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class NewsDTO {

    /**
     * 资讯ID: 必填
     */
    @NotNull(groups = { UpdateGroup.class }, message = "资讯ID不能为空")
    @Schema(description = "资讯ID: 必填")
    private Integer newsId;

    /**
     * 资讯标题: 必填
     */
    @NotBlank(groups = { CreateGroup.class }, message = "资讯标题不能为空")
    @Schema(description = "资讯标题: 必填")
    private String newsTitle;

    /**
     * 资讯内容
     */
    @Schema(description = "资讯内容")
    private String newsContent;

    /**
     * 资讯图片URL
     */
    @Schema(description = "资讯图片URL")
    private String newsImageUrl;
}
